#include<bits/stdc++.h>
#define int long long
#define db double 
using namespace std;
inline int read(){
	int x=0;bool f=0;char ch=getchar();
	while(ch<'0'||ch>'9')f^=(ch=='-'),ch=getchar();
	while('0'<=ch&&ch<='9')x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
	return f?-x:x;
}
const db inf=1e9;
int n,m;
db ans;
db f[505][505];
struct node{
	int a,b;
}p[505];
inline bool cmp(node a,node b){
	if(a.b==-1)return 0;
	if(b.b==-1)return 1;
	if(a.b==b.b)return a.a>b.a;
	return a.b<b.b;
}
inline bool cmp1(node a,node b){
	return a.a<b.a;
}
signed main(){
	freopen("talk2.in","r",stdin);
//	freopen("talk.out","w",stdout);
	n=read();m=read();
	for(int i=1;i<=n;i++){
		p[i]={read(),read()};
		ans+=p[i].a;
	}
	db res=0;
	for(int k=1;k<=n;k++){
		sort(p+1,p+1+n,cmp);
		res+=p[k].b/1.0/k;
		for(int i=0;i<=n;i++)
			for(int j=0;j<=n;j++)f[i][j]=inf;
		f[k][k]=res;
		sort(p+k,p+1+n,cmp1);
		for(int i=k;i<n;i++)
			for(int j=k;j<=min(i,m);j++){
				f[i+1][j]=min(f[i+1][j],f[i][j]);
				f[i+1][j+1]=min(f[i+1][j+1],f[i][j]+p[i+1].a/1.0/(k+1));
			}
		ans=min(ans,f[n][m]);
		printf("%d:%.6lf\n",k,f[n][m]);
	}
	printf("%.7lf",ans);
	return 0;
}

